package main.example.demo02;

import java.io.IOException;

public class Main {

    public static void main(String[] args) {
        FileIO fileIO = new FileProperties();
        try {
            fileIO.readFromFile("./demo02_adapter/file.txt");
            System.out.println("fileIO.getValue(\"year\") = " + fileIO.getValue("year"));
            fileIO.setValue("day","21");
            fileIO.setValue("year","2004");
            fileIO.setValue("month","4");
            fileIO.writeToFile("./demo02_adapter/newFile.txt");
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

}
